import java.util.*;

public class Main
{
    public static void main(String []args)
    {
	try
	{
	    Locale.setDefault(Locale.US);
	    Scanner in = new Scanner(System.in);
	    int N = in.nextInt(), n = in.nextInt();
	    double[][] P = new double[N][N];
	    double q[] = new double[N];
	    double[][] Q = new double[N][N];
	    double pi[] = new double[N - 1];
	    int xi[] = new int[n];
	    for (int i = 0; i < N; ++i)
	    {
		Q[i][0] = P[i][0] = in.nextDouble();
		for (int j = 1; j < N; ++j)
		{
		    P[i][j] = in.nextDouble();
		    Q[i][j] = Q[i][j - 1] + P[i][j];
		}
	    }
	    q[0] = pi[0] = in.nextDouble();
	    q[N - 1] = 1;
	    for (int i = 1; i < N - 1; ++i)
	    {
		pi[i] = in.nextDouble();
		q[i]  = q[i- 1] + pi[i];
	    }
	    Random rnd = new Random(System.nanoTime());
	    double cur = rnd.nextDouble();
	    if (cur < q[0])
		xi[0] = 0;
	    else
	    {
		for (int i = 1; i < N; ++i)
		    if (cur >= q[i - 1] && cur < q[i])
		    {
			xi[0] = i; break;
		    }
	    }
	    for (int count = 1; count < n; ++count)
	    {
		double []temp = Q[xi[count - 1]];
		cur = rnd.nextDouble();
		if (cur < temp[0])
		    xi[count] = 0;
		else
		{
		    for (int i = 1; i < N; ++i)
			if (cur >= temp[i - 1] && cur < temp[i])
			{
			    xi[count] = i; break;
			}
		}
	    }
	    double finalP[] = new double [N];
	    for (int t : xi)
		++finalP[t];
	    for (int i = 0; i < N; ++i)
		finalP[i] /= n;
	    for (double t : finalP)
		System.out.println(t);
	}
	catch(Throwable e){System.out.println(e.getMessage());}
    }
}